package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yupi.springbootinit.model.dto.processsheet.ProcessSheetAddRequest;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单版次表
 */
@TableName(value = "process_batch")
@Data
public class ProcessBatch implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("process_sheet_id")
    private Long processSheetId;

    /**
     * 版次计划ID（关联 process_sheet_batch.id）
     */
    @TableField("batch_plan_id")
    private Long batchPlanId;

    @TableField("source_type")
    private Integer sourceType;

    @TableField("source_id")
    private Long sourceId;

    @TableField("source_no")
    private String sourceNo;

    @TableField("order_type")
    private String orderType;

    @TableField("order_number")
    private String orderNumber;

    @TableField("product_name")
    private String productName;

    @TableField("batch_code")
    private String batchCode;


    /**
     * 流程卡编号
     */
    @TableField("flow_number")
    private String flowNumber;

    /**
     * 生产计划号（
     */
    @TableField("production_plan_number")
    private String productionPlanNumber;

    @TableField("quantity")
    private Integer quantity;

    /**
     *生产设备ID
     */
    @TableField("device_id")
    private Integer deviceId;

    /**
     * 设备编码
     */
    @TableField("device_code")
    private String deviceCode;

    /**
     *设备名称
     */
    @TableField("device_name")
    private String deviceName;


    @TableField("powder_model")
    private String powderModel;

    @TableField("powder_weight")
    private BigDecimal powderWeight;

    @TableField("cleaning_device_id")
    private Long cleaningDeviceId;

    @TableField("cleaning_device_name")
    private String cleaningDeviceName;

    @TableField("plan_start")
    private LocalDateTime planStart;

    @TableField("plan_end")
    private LocalDateTime planEnd;

    @TableField("status")
    private String status;

    @TableField("publish_time")
    private LocalDateTime publishTime;

    @TableField("createdBy")
    private Long createdBy;

    @TableField("createdByName")
    private String createdByName;

    @Version
    @TableField("version")
    private Integer version;

    private String remark;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}